package com.llq.studentinfo;

public class Performance {

	private int[] scores;

	public void setScores(int...scores) {
		this.scores=scores;
	}

	public double getAverage() {
		if (scores==null) {
			return 0.0;
		}
		double total=0.0;
		for (int score : scores) {
			total+=score;
		}
		return total/scores.length;
	}

}
